var caregiverSendOrdersStandardArray = [];

$(function() {
	load_caregiverSendOrdersStandard_select();
	load_caregiverSendOrdersStandard_cond_select();
	
	_addChangeListener("#caregiverSendOrdersStandard_select", function() {
		var option = $('#caregiverSendOrdersStandard_select option:selected');
		if(view && view.data) {view.data.orderStandardName = option.text();}
	});
});

function load_caregiverSendOrdersStandard_select() {
	if($('#caregiverSendOrdersStandard_select').length==0) {return;}

	$('#caregiverSendOrdersStandard_select').html('<option value="" selected></option>');

	findAll_basic(path+'/caregiverSendOrdersStandard/findAll', function(response) {
		caregiverSendOrdersStandardArray = response.data;
		
		for(var i=0; i<response.data.length; i++) {
			$('#caregiverSendOrdersStandard_select').append('<option value="' + response.data[i].caregiverSendOrdersStandardId
				+ '">' + response.data[i].standardName + ' ' + response.data[i].salary + '元/天' + '</option>');
		}
	});
}

function load_caregiverSendOrdersStandard_cond_select() {
	if($('#caregiverSendOrdersStandard_cond_select').length==0) {return;}

	$('#caregiverSendOrdersStandard_cond_select').html('<option value="" selected></option>');

	findAll_basic(path+'/caregiverSendOrdersStandard/findAll', function(response) {
		for(var i=0; i<response.data.length; i++) {
			$('#caregiverSendOrdersStandard_cond_select').append('<option value="' + response.data[i].caregiverSendOrdersStandardId
				+ '">' + response.data[i].standardName + ' ' + response.data[i].salary + '元/天' + '</option>');
		}
	});
}
